diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 09:51:45 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 09:51:45 -0700 |
commit | 315dd7104f02a278b9ade41345060ed5f6825fbb (patch) | |
tree | 66a99745a125efb52638a529e41c2f8402b56bb3 | |
parent | 2e9225c591d8bec29b2624604984e2b3ea5bc22c (diff) | |
download | stage-315dd7104f02a278b9ade41345060ed5f6825fbb.tar.gz stage-315dd7104f02a278b9ade41345060ed5f6825fbb.tar.bz2 stage-315dd7104f02a278b9ade41345060ed5f6825fbb.tar.xz stage-315dd7104f02a278b9ade41345060ed5f6825fbb.zip |
Added install script for vim support.
-rwxr-xr-x | support/vim/install.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/support/vim/install.sh b/support/vim/install.sh new file mode 100755 index 0000000..2a77b1b --- /dev/null +++ b/support/vim/install.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | for type in {ftdetect,ftplugin,syntax}/stage.vim; do | ||
4 | if [[ ! -e $type ]]; then | ||
5 | echo "You don't seem to be in the right directory." | ||
6 | echo "Run this from stage/support/vim" | ||
7 | exit | ||
8 | fi | ||
9 | done | ||
10 | |||
11 | if [[ $(whoami) != "root" ]]; then | ||
12 | echo You should probably run this as root... | ||
13 | exit | ||
14 | fi | ||
15 | |||
16 | for type in ftdetect ftplugin syntax; do | ||
17 | for dest in /usr/share/vim/vim*; do | ||
18 | if [[ ! -d $dest/$type ]]; then mkdir -v $dest/$type; fi | ||
19 | if [[ -e $dest/$type/stage.vim ]]; then rm -v $dest/$type/stage.vim; fi | ||
20 | cp -v $type/stage.vim $dest/$type | ||
21 | done | ||
22 | done | ||